home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-03-20 | 2.8 KB | 62 lines | [TEXT/MPS ] |
- A brief description of the "LaserWriter--custom dialogs" code.
-
- Messages overridden:
-
- Overrides for our custom dialog support
- ---------------------------------------
- gxInitialize - Saves off app's A5.
- gxShutDown - Tosses our context data.
- gxPrDlgMain - Complete override for Job dialog, partial for Style.
- gxPrStlInit - Stores a flag which says "we're putting up the Style dialog."
- gxPrJobInit - Stores a flag which says "we're putting up the Job dialog."
-
- Other driver overrides.
- -----------------------
- gxPrValidate - Validates old print records.
- gxPrintDefault - Creates a default print record.
- gxConvertPrintRecordTo - Converts an old print record to a universal print record.
- gxConvertPrintRecordFrom - Converts a universal print record to an old print record.
-
-
- What this code does:
- --------------------
- This PS driver has a completely custom job dialog, yet uses the default
- Page Setup dialog.
-
-
- Interesting tricks and tidbits:
- -------------------------------
- If you need to customize the old-API dialogs for a PostScript
- driver, you cannot simply add a 'dctl' and 'DITL' resource like you
- can for a raster or vector driver. The default PostScript
- implementation will ignore your resources. Also, because of
- everything the default PostScript implementation does with its own
- dctl behind the scenes, you cannot partially override gxPrDlgMain,
- switch in your dialog somehow and live to tell about it. You must
- completely override gxPrDlgMain if you're doing custom old-API
- dialogs for a PostScript driver.
-
- Our gxPrDlgMain code needs to determine if the Style or Job dialogs
- are being displayed. It does this having its PrStlInit and PrJobInit
- overrides store a flag in the message instance's context. This flag
- tells our PrDlgMain override if we're displaying the Style or Job
- dialogs. If it's the Job dialog, we completely override PrDlgMain and
- handle the dialog. If its the Style dialog, we simply forward the
- gxPrDlgMain message and let GX completely implement it.
-
- You need the application's A5 reference if it adds things to the old
- dialogs via callbacks. To get the application's A5, we save the
- currentA5 in the gxInitialize override. That will be the app's A5
- reference. We store this reference in our instance context for later
- retrieval.
-
- The default PostScript implementation of PrJobInit installs an item
- handler proc for the default old-API dialogs. The "print to file"
- StandardFile dialog is handled in that item handling proc. Since
- we need to completely override gxPrJobInit, the default "print to file"
- file dialog code is never used. You must supply that fuinctionality
- if you completely override PrJobInit, and you want to print to
- PostScript (or other) files. This code has a routine called
- "PrepForFileWriting" which handles this work.
-
- dmh 6/20/94